# Triton Performance Testing Makefile

.PHONY: help install download train-pytorch train-triton compare benchmark clean

help:
	@echo "Triton Performance Testing"
	@echo ""
	@echo "Available targets:"
	@echo "  train-pytorch    - Run PyTorch baseline training"
	@echo "  train-triton     - Run Triton optimized training"
	@echo "  compare          - Compare PyTorch vs Triton results"
	@echo "  benchmark        - Run full benchmark suite"
	@echo "  clean            - Clean generated files"




train-pytorch:
	cd scripts/train && bash run_pytorch.sh

train-triton:
	cd scripts/train && bash run_triton.sh

train-pytorch-multi:
	cd scripts/train && NUM_GPUS=4 bash run_pytorch.sh

train-triton-multi:
	cd scripts/train && NUM_GPUS=4 bash run_triton.sh

compare:
	cd scripts/tools && python compare_results.py

benchmark:
	cd scripts/tools && python benchmark.py

clean:
	find . -type d -name "__pycache__" -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete
	find . -type f -name "*.pyo" -delete
	find . -type d -name "*.egg-info" -exec rm -rf {} +
	rm -rf results/
	rm -rf logs/

clean-models:
	rm -rf models/
	rm -rf data/

